package com.hnust.dao.test;

import com.hnust.MainApp;
import com.hnust.dao.*;
import com.hnust.domain.*;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.List;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = MainApp.class)

public class testQuestionAboutDao {
    @Autowired
    public QuestionDao questionDao;
    @Autowired
    public TeaCourseGroupDao teaCourseGroupDao;
    @Autowired
    public CourseGroupDao courseGroupDao;
    @Autowired
    public CourseDao courseDao;
    @Autowired
    public AlternativeAnswerDao alternativeAnswerDao;
    @Autowired
    public ChapterDao chapterDao;
    @Test
    public void testGetQuestion(){
        List<Question> a =questionDao.getQuestionList("ac8c18382d",1,1);

    }
    @Test
    public void testGetCourseGourp(){
        List<String> a=teaCourseGroupDao.getCourseGroupData("as8x145fds");

    }
    @Test
    public void testGetCourseId(){
        String a = courseGroupDao.getCourseId("1cx4s78sb");

    }
    @Test
    public void testGetCourse(){
        String a = courseDao.getCourse("4b15d50");

    }

    @Test
    public void testQueryQuestionList(){
        List<Question> a =questionDao.queryQuestionList("ac8c18382d","1",1,1);

    }
    @Test
    public void testDelete(){
        Integer c = questionDao.deleteQuestionAnswer("99");
        Integer a = questionDao.deleteQuestion("99");
        Integer b = questionDao.deleteQuestionRecord("99");


    }
    @Test
    public void testGetType(){
        List<String> a = questionDao.getCourseQuestionList("ersdaf");
        QuestionType b = questionDao.getCourseQuesTypeList("2222");

    }

    @Autowired
    public CourseTargetDao courseTargetDao;
    @Test
    public void testGetTargetId(){
        List<CourseTarget> a =courseTargetDao.getCourseTarget("ersdaf");

   }
   @Test
    public void testModifyQuestion(){
        Integer a = questionDao.modifyQuestionById("5","啥都不会啊","ersdaf","1000003","4444",1,"不会啊","不会啊","1659423351",1);
        Integer b = alternativeAnswerDao.addAnswer("5","答案是氧",1,"111");

   }
   @Test
    public void testAddAnswer(){
        Integer a = alternativeAnswerDao.addAnswer("5","纯度大大降低了",1,"123");

   }
   @Test
    public void testAddQuestion(){
        Integer a= questionDao.addQuestion("1453","啥都不会啊","ersdaf","1000003","4444",1,"不会啊","不会啊","1659423351",1);

   }
   @Test
    public void testGetChapter(){
        List<Chapter> a = chapterDao.getChapter("ac8c18382d");

   }

}
